package com.skytech.component.crawler.task;

import java.util.function.Consumer;

public class ConsumerRunnable implements Runnable {

    private Consumer<String> consumer;
    private String threadName;

    public ConsumerRunnable(Consumer<String> consumer, String threadName){
        this.consumer = consumer;
        this.threadName = threadName;
    }

    @Override
    public void run() {
        consumer.accept(this.threadName);
    }
}
